3.2.32 \(\int \frac {\csc ^3(e+f x)}{(a+b \tan ^2(e+f x))^{3/2}} \, dx\) [132]

Optimal. Leaf size=127 \[ -\frac {(a-3 b) \tanh ^{-1}\left (\frac {\sqrt {a} \sec (e+f x)}{\sqrt {a-b+b \sec ^2(e+f x)}}\right )}{2 a^{5/2} f}-\frac {\cot (e+f x) \csc (e+f x)}{2 a f \sqrt {a-b+b \sec ^2(e+f x)}}-\frac {3 b \sec (e+f x)}{2 a^2 f \sqrt {a-b+b \sec ^2(e+f x)}} \]

[Out]

-1/2*(a-3*b)*arctanh(sec(f*x+e)*a^(1/2)/(a-b+b*sec(f*x+e)^2)^(1/2))/a^(5/2)/f-1/2*cot(f*x+e)*csc(f*x+e)/a/f/(a
-b+b*sec(f*x+e)^2)^(1/2)-3/2*b*sec(f*x+e)/a^2/f/(a-b+b*sec(f*x+e)^2)^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.11, antiderivative size = 127, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.240, Rules used = {3745, 482, 541, 12, 385, 213} \begin {gather*} -\frac {(a-3 b) \tanh ^{-1}\left (\frac {\sqrt {a} \sec (e+f x)}{\sqrt {a+b \sec ^2(e+f x)-b}}\right )}{2 a^{5/2} f}-\frac {3 b \sec (e+f x)}{2 a^2 f \sqrt {a+b \sec ^2(e+f x)-b}}-\frac {\cot (e+f x) \csc (e+f x)}{2 a f \sqrt {a+b \sec ^2(e+f x)-b}} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Csc[e + f*x]^3/(a + b*Tan[e + f*x]^2)^(3/2),x]

[Out]

-1/2*((a - 3*b)*ArcTanh[(Sqrt[a]*Sec[e + f*x])/Sqrt[a - b + b*Sec[e + f*x]^2]])/(a^(5/2)*f) - (Cot[e + f*x]*Cs
c[e + f*x])/(2*a*f*Sqrt[a - b + b*Sec[e + f*x]^2]) - (3*b*Sec[e + f*x])/(2*a^2*f*Sqrt[a - b + b*Sec[e + f*x]^2
])

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 213

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[b, 2])^(-1))*ArcTanh[Rt[b, 2]*(x/Rt[-a, 2])]
, x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (LtQ[a, 0] || GtQ[b, 0])

Rule 385

Int[((a_) + (b_.)*(x_)^(n_))^(p_)/((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Subst[Int[1/(c - (b*c - a*d)*x^n), x]
, x, x/(a + b*x^n)^(1/n)] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && EqQ[n*p + 1, 0] && IntegerQ[n]

Rule 482

Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> Simp[e^(n - 1
)*(e*x)^(m - n + 1)*(a + b*x^n)^(p + 1)*((c + d*x^n)^(q + 1)/(n*(b*c - a*d)*(p + 1))), x] - Dist[e^n/(n*(b*c -
 a*d)*(p + 1)), Int[(e*x)^(m - n)*(a + b*x^n)^(p + 1)*(c + d*x^n)^q*Simp[c*(m - n + 1) + d*(m + n*(p + q + 1)
+ 1)*x^n, x], x], x] /; FreeQ[{a, b, c, d, e, q}, x] && NeQ[b*c - a*d, 0] && IGtQ[n, 0] && LtQ[p, -1] && GeQ[n
, m - n + 1] && GtQ[m - n + 1, 0] && IntBinomialQ[a, b, c, d, e, m, n, p, q, x]

Rule 541

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_.)*((e_) + (f_.)*(x_)^(n_)), x_Symbol] :> Simp[(
-(b*e - a*f))*x*(a + b*x^n)^(p + 1)*((c + d*x^n)^(q + 1)/(a*n*(b*c - a*d)*(p + 1))), x] + Dist[1/(a*n*(b*c - a
*d)*(p + 1)), Int[(a + b*x^n)^(p + 1)*(c + d*x^n)^q*Simp[c*(b*e - a*f) + e*n*(b*c - a*d)*(p + 1) + d*(b*e - a*
f)*(n*(p + q + 2) + 1)*x^n, x], x], x] /; FreeQ[{a, b, c, d, e, f, n, q}, x] && LtQ[p, -1]

Rule 3745

Int[sin[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]^2)^(p_.), x_Symbol] :> With[{ff = Free
Factors[Sec[e + f*x], x]}, Dist[1/(f*ff^m), Subst[Int[(-1 + ff^2*x^2)^((m - 1)/2)*((a - b + b*ff^2*x^2)^p/x^(m
 + 1)), x], x, Sec[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, p}, x] && IntegerQ[(m - 1)/2]

Rubi steps

\begin {align*} \int \frac {\csc ^3(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^{3/2}} \, dx &=\frac {\text {Subst}\left (\int \frac {x^2}{\left (-1+x^2\right )^2 \left (a-b+b x^2\right )^{3/2}} \, dx,x,\sec (e+f x)\right )}{f}\\ &=-\frac {\cot (e+f x) \csc (e+f x)}{2 a f \sqrt {a-b+b \sec ^2(e+f x)}}+\frac {\text {Subst}\left (\int \frac {a-b-2 b x^2}{\left (-1+x^2\right ) \left (a-b+b x^2\right )^{3/2}} \, dx,x,\sec (e+f x)\right )}{2 a f}\\ &=-\frac {\cot (e+f x) \csc (e+f x)}{2 a f \sqrt {a-b+b \sec ^2(e+f x)}}-\frac {3 b \sec (e+f x)}{2 a^2 f \sqrt {a-b+b \sec ^2(e+f x)}}+\frac {\text {Subst}\left (\int \frac {(a-3 b) (a-b)}{\left (-1+x^2\right ) \sqrt {a-b+b x^2}} \, dx,x,\sec (e+f x)\right )}{2 a^2 (a-b) f}\\ &=-\frac {\cot (e+f x) \csc (e+f x)}{2 a f \sqrt {a-b+b \sec ^2(e+f x)}}-\frac {3 b \sec (e+f x)}{2 a^2 f \sqrt {a-b+b \sec ^2(e+f x)}}+\frac {(a-3 b) \text {Subst}\left (\int \frac {1}{\left (-1+x^2\right ) \sqrt {a-b+b x^2}} \, dx,x,\sec (e+f x)\right )}{2 a^2 f}\\ &=-\frac {\cot (e+f x) \csc (e+f x)}{2 a f \sqrt {a-b+b \sec ^2(e+f x)}}-\frac {3 b \sec (e+f x)}{2 a^2 f \sqrt {a-b+b \sec ^2(e+f x)}}+\frac {(a-3 b) \text {Subst}\left (\int \frac {1}{-1+a x^2} \, dx,x,\frac {\sec (e+f x)}{\sqrt {a-b+b \sec ^2(e+f x)}}\right )}{2 a^2 f}\\ &=-\frac {(a-3 b) \tanh ^{-1}\left (\frac {\sqrt {a} \sec (e+f x)}{\sqrt {a-b+b \sec ^2(e+f x)}}\right )}{2 a^{5/2} f}-\frac {\cot (e+f x) \csc (e+f x)}{2 a f \sqrt {a-b+b \sec ^2(e+f x)}}-\frac {3 b \sec (e+f x)}{2 a^2 f \sqrt {a-b+b \sec ^2(e+f x)}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(304\) vs. \(2(127)=254\).
time = 3.65, size = 304, normalized size = 2.39 \begin {gather*} \frac {-\frac {(a+3 b+(a-3 b) \cos (2 (e+f x))) \csc ^2(e+f x) \sec (e+f x)}{\sqrt {2} a^2 \sqrt {(a+b+(a-b) \cos (2 (e+f x))) \sec ^2(e+f x)}}+\frac {(a-3 b) \cos (e+f x) \left (2 \tanh ^{-1}\left (\tan ^2\left (\frac {1}{2} (e+f x)\right )-\frac {\sqrt {4 b \tan ^2\left (\frac {1}{2} (e+f x)\right )+a \left (-1+\tan ^2\left (\frac {1}{2} (e+f x)\right )\right )^2}}{\sqrt {a}}\right )+\log \left (a-2 b-a \tan ^2\left (\frac {1}{2} (e+f x)\right )+\sqrt {a} \sqrt {4 b \tan ^2\left (\frac {1}{2} (e+f x)\right )+a \left (-1+\tan ^2\left (\frac {1}{2} (e+f x)\right )\right )^2}\right )\right ) \sec ^2\left (\frac {1}{2} (e+f x)\right ) \sqrt {(a+b+(a-b) \cos (2 (e+f x))) \sec ^2(e+f x)}}{2 a^{5/2} \sqrt {(a+b+(a-b) \cos (2 (e+f x))) \sec ^4\left (\frac {1}{2} (e+f x)\right )}}}{2 f} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Csc[e + f*x]^3/(a + b*Tan[e + f*x]^2)^(3/2),x]

[Out]

(-(((a + 3*b + (a - 3*b)*Cos[2*(e + f*x)])*Csc[e + f*x]^2*Sec[e + f*x])/(Sqrt[2]*a^2*Sqrt[(a + b + (a - b)*Cos
[2*(e + f*x)])*Sec[e + f*x]^2])) + ((a - 3*b)*Cos[e + f*x]*(2*ArcTanh[Tan[(e + f*x)/2]^2 - Sqrt[4*b*Tan[(e + f
*x)/2]^2 + a*(-1 + Tan[(e + f*x)/2]^2)^2]/Sqrt[a]] + Log[a - 2*b - a*Tan[(e + f*x)/2]^2 + Sqrt[a]*Sqrt[4*b*Tan
[(e + f*x)/2]^2 + a*(-1 + Tan[(e + f*x)/2]^2)^2]])*Sec[(e + f*x)/2]^2*Sqrt[(a + b + (a - b)*Cos[2*(e + f*x)])*
Sec[e + f*x]^2])/(2*a^(5/2)*Sqrt[(a + b + (a - b)*Cos[2*(e + f*x)])*Sec[(e + f*x)/2]^4]))/(2*f)

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(5632\) vs. \(2(111)=222\).
time = 0.38, size = 5633, normalized size = 44.35

method result size
default \(\text {Expression too large to display}\) \(5633\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(csc(f*x+e)^3/(a+b*tan(f*x+e)^2)^(3/2),x,method=_RETURNVERBOSE)

[Out]

result too large to display

________________________________________________________________________________________

Maxima [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)^3/(a+b*tan(f*x+e)^2)^(3/2),x, algorithm="maxima")

[Out]

Timed out

________________________________________________________________________________________

Fricas [A]
time = 2.80, size = 479, normalized size = 3.77 \begin {gather*} \left [-\frac {{\left ({\left (a^{2} - 4 \, a b + 3 \, b^{2}\right )} \cos \left (f x + e\right )^{4} - {\left (a^{2} - 5 \, a b + 6 \, b^{2}\right )} \cos \left (f x + e\right )^{2} - a b + 3 \, b^{2}\right )} \sqrt {a} \log \left (-\frac {2 \, {\left ({\left (a - b\right )} \cos \left (f x + e\right )^{2} + 2 \, \sqrt {a} \sqrt {\frac {{\left (a - b\right )} \cos \left (f x + e\right )^{2} + b}{\cos \left (f x + e\right )^{2}}} \cos \left (f x + e\right ) + a + b\right )}}{\cos \left (f x + e\right )^{2} - 1}\right ) - 2 \, {\left ({\left (a^{2} - 3 \, a b\right )} \cos \left (f x + e\right )^{3} + 3 \, a b \cos \left (f x + e\right )\right )} \sqrt {\frac {{\left (a - b\right )} \cos \left (f x + e\right )^{2} + b}{\cos \left (f x + e\right )^{2}}}}{4 \, {\left ({\left (a^{4} - a^{3} b\right )} f \cos \left (f x + e\right )^{4} - a^{3} b f - {\left (a^{4} - 2 \, a^{3} b\right )} f \cos \left (f x + e\right )^{2}\right )}}, \frac {{\left ({\left (a^{2} - 4 \, a b + 3 \, b^{2}\right )} \cos \left (f x + e\right )^{4} - {\left (a^{2} - 5 \, a b + 6 \, b^{2}\right )} \cos \left (f x + e\right )^{2} - a b + 3 \, b^{2}\right )} \sqrt {-a} \arctan \left (\frac {\sqrt {-a} \sqrt {\frac {{\left (a - b\right )} \cos \left (f x + e\right )^{2} + b}{\cos \left (f x + e\right )^{2}}} \cos \left (f x + e\right )}{a}\right ) + {\left ({\left (a^{2} - 3 \, a b\right )} \cos \left (f x + e\right )^{3} + 3 \, a b \cos \left (f x + e\right )\right )} \sqrt {\frac {{\left (a - b\right )} \cos \left (f x + e\right )^{2} + b}{\cos \left (f x + e\right )^{2}}}}{2 \, {\left ({\left (a^{4} - a^{3} b\right )} f \cos \left (f x + e\right )^{4} - a^{3} b f - {\left (a^{4} - 2 \, a^{3} b\right )} f \cos \left (f x + e\right )^{2}\right )}}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)^3/(a+b*tan(f*x+e)^2)^(3/2),x, algorithm="fricas")

[Out]

[-1/4*(((a^2 - 4*a*b + 3*b^2)*cos(f*x + e)^4 - (a^2 - 5*a*b + 6*b^2)*cos(f*x + e)^2 - a*b + 3*b^2)*sqrt(a)*log
(-2*((a - b)*cos(f*x + e)^2 + 2*sqrt(a)*sqrt(((a - b)*cos(f*x + e)^2 + b)/cos(f*x + e)^2)*cos(f*x + e) + a + b
)/(cos(f*x + e)^2 - 1)) - 2*((a^2 - 3*a*b)*cos(f*x + e)^3 + 3*a*b*cos(f*x + e))*sqrt(((a - b)*cos(f*x + e)^2 +
 b)/cos(f*x + e)^2))/((a^4 - a^3*b)*f*cos(f*x + e)^4 - a^3*b*f - (a^4 - 2*a^3*b)*f*cos(f*x + e)^2), 1/2*(((a^2
 - 4*a*b + 3*b^2)*cos(f*x + e)^4 - (a^2 - 5*a*b + 6*b^2)*cos(f*x + e)^2 - a*b + 3*b^2)*sqrt(-a)*arctan(sqrt(-a
)*sqrt(((a - b)*cos(f*x + e)^2 + b)/cos(f*x + e)^2)*cos(f*x + e)/a) + ((a^2 - 3*a*b)*cos(f*x + e)^3 + 3*a*b*co
s(f*x + e))*sqrt(((a - b)*cos(f*x + e)^2 + b)/cos(f*x + e)^2))/((a^4 - a^3*b)*f*cos(f*x + e)^4 - a^3*b*f - (a^
4 - 2*a^3*b)*f*cos(f*x + e)^2)]

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\csc ^{3}{\left (e + f x \right )}}{\left (a + b \tan ^{2}{\left (e + f x \right )}\right )^{\frac {3}{2}}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)**3/(a+b*tan(f*x+e)**2)**(3/2),x)

[Out]

Integral(csc(e + f*x)**3/(a + b*tan(e + f*x)**2)**(3/2), x)

________________________________________________________________________________________

Giac [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: TypeError} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)^3/(a+b*tan(f*x+e)^2)^(3/2),x, algorithm="giac")

[Out]

Exception raised: TypeError >> An error occurred running a Giac command:INPUT:sage2:=int(sage0,sageVARx):;OUTP
UT:Warning, integration of abs or sign assumes constant sign by intervals (correct if the argument is real):Ch
eck [abs(t_

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {1}{{\sin \left (e+f\,x\right )}^3\,{\left (b\,{\mathrm {tan}\left (e+f\,x\right )}^2+a\right )}^{3/2}} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(sin(e + f*x)^3*(a + b*tan(e + f*x)^2)^(3/2)),x)

[Out]

int(1/(sin(e + f*x)^3*(a + b*tan(e + f*x)^2)^(3/2)), x)

________________________________________________________________________________________